//
//  SYJCache.m
//  JieJieKan
//
//  Created by 极速现金侠 on 2017/7/10.
//  Copyright © 2017年 innext. All rights reserved.
//

#import "SYJCache.h"
#import "YYCache.h"

@interface SYJCache ()
@property (nonatomic,strong) YYCache *userInfoCache;
@end

@implementation SYJCache
+ (instancetype)manager {
    static SYJCache *instance = nil;
    static dispatch_once_t onceToken;
    dispatch_once(&onceToken, ^{
        instance = [[SYJCache alloc] init];
    });
    return instance;
}
- (instancetype)init
{
    self = [super init];
    if (self) {
//        // 建个小数据表
//     self.userInfoCache = [[YYCache alloc] initWithName:@"SYJ_CACHE_CENTER"];
        
        
    }
    return self;
}

- (YYCache *)cache{
    
    if (self.userInfoCache == nil) {
        self.userInfoCache = [[YYCache alloc] initWithName:@"SYJ_CACHE_CENTER"];
    }
    return self.userInfoCache;
}
@end
